package com.umbr3lla.main.model;

import com.umbr3lla.main.state.GameState;
import com.umbr3lla.main.state.Player;
import com.umbr3lla.main.state.Turn;
import com.umbr3lla.main.state.cards.PlayerCard;

public class GameUtils {

	public static Turn getCurrentPlayerTurn()
	{
		return getCurrentPlayer().getCurrentTurn();
	}
	
	public static Player getCurrentPlayer()
	{
		return GameState.getGameState().getCurrentPlayer();
	}
	
	public static void addPlayerToGameAndAssignCharacter(byte playerId)
	{
		PlayerCard pc = GameState.getGameState().getRandomPlayerCard();
		GameState.getGameState().addPlayer(new Player(pc, playerId));
		
		//send the data over to the client
		GameState.getGameState().getPlayerIFaceLayer().sendGameCharacterId(pc.getCardIdName(), playerId);
	}
	
	
	/**
	 * Wait on question from user
	 * @param question
	 * @return
	 */
	public static boolean promptQuestionPlayer(String question, byte player)
	{
		return GameState.getGameState().getPlayerIFaceLayer().promptQuestion(question, player);
	}
	
	
}
